7. Troubleshooting / Q&A

This Director file contains a few basic Lingo scripts, that explains the usage of #html cast members. If you have any further questions about the usage and implementation of #html cast members please contact ssb@mcmm.com (Stefan Schmidt-Bilkenroth). We like to answer your questions as soon as possible and we will prepare a Q&A for the users of this Xtra.

Here is a brief collection of questions, we were asked lately:

Do you have a sample movie for dir 5?

The HTML-Xtra does not work with Director versions prior to 6.0

I have trouble using "set the html of member".

If the html parser of the xtra does not get a valid HTML string, it ignores the string and blanks its display. The minimum set of HTML tags is

<HTML><BODY><P>text</P></BODY></HTML>

I noticed that when we issue a: 'set the filename of member "HTML Field" to "http://www.mcmm.com/"' that it just deletes the HTML member.

1. the filename of member:
The Xtra does (at the moment) not support this property. Director handles this command for all kind of cast members the way it likes.

2. "http://www.mcmm.com"
To load files from the internet, you need to use the NetLingo commands to download the HTML source into a string.
Caution: Since there is only a subset of the HTML tags supported, the source might not be displayed as expected. The purpose of the HTML-Xtra was not to replace browsers.

I like to use subdirectories for my HTML files. How do I parse the URL encoded links to the proper OS pathnames?

The Director movie includes a simple handler which converts URL encoded pathnames to pathnames the actual platform understands. It also takes care of relative pathnames.

What fonts need to be installed on the target machines?

On Mac OS we use: Geneva, Helvetica, Monaco.
On Windows we use: Arial, Courier New, MS Sans Serif.
These fonts are usually installed during the setup of the system software.
To change the defaut fonts use the SetDefault method of the xtra. If a font is requested, that isn't installed on the actual computer, the xtra uses the system font for display.
The default font specifications are overruled by the <FONT FACE="..."> tag. This tag can contain lists of fonts, especially for usage on MacOS and Windows.

These fonts are installed, but the result is not as expected.

Check the HTML source, if the font parameter is used there.

Director crashes when the on link handler uses 'go ... of movie "..."'

This results from the way Director handles callbacks from xtras. When the callback uses 'go ... movie "..."', and the target movie does not have an instance of the HTML xtra, all instances of this xtra are cleared in memory. But after the callback is finished, Director returns to the xtra for cleaning up the C++ calling stack. As the xtra is not available any more, director will jump to a void position of the memory, and this will surely crash.
This is not a bug of the xtra anyway.

To avoid this problem you can (a) store the "go" statement into a global variable and then perform the go after the callback is finished, or (b) simply keep the xtra instances in a shared library which is available to all movie files.

How can I prepare indentations or provide white space in the html xtra?

Simply use the image tag like <img src="space" width="20" height="1">. The image is then rendered as white space with a width of 20 pixels.

I have found a bug!

Please don't hesitate to send bug reports to ssb@mcmm.com.

Known Conflicts and Limitations: